<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="erp" uri="/erp-tags"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE HTML>
<html>
<head>
<base href="<%=basePath%>">
<link rel="stylesheet"
	href="<%=basePath%>script/jquery-ui-1.10.4/themes/base/jquery.ui.all.css">
<script src="<%=basePath%>script/jquery-ui-1.10.4/jquery-1.10.2.js"></script>
<script src="<%=basePath%>script/jquery-ui-1.10.4/ui/jquery.ui.core.js"></script>
<script
	src="<%=basePath%>script/jquery-ui-1.10.4/ui/jquery.ui.widget.js"></script>
<script
	src="<%=basePath%>script/jquery-ui-1.10.4/ui/jquery.ui.button.js"></script>
<script src="<%=basePath%>script/script.js"></script>
<link rel="stylesheet"
	href="<%=basePath%>script/jquery-ui-1.10.4/demos/demos.css">
<link rel="stylesheet" href="<%=basePath%>style/style.css">
<script>
	$(function() {
		init_list_page();
	});
</script>
</head>
<body>

	<div class="ui-widget list_container center">
		<h1>我的申请历史</h1>
		<table class="ui-widget ui-widget-content">
			<thead>
				<tr class="ui-widget-header ">
					<th>标题</th>
					<th>申请时间</th>
					<th>申请状态</th>
					<th>备注</th>
					<th colspan="2">操作</th>
				</tr>
			</thead>
			<tbody>
				<s:iterator value="%{#request.applyList}">
					<tr>
						<td>${title}</td>
						<td><s:date name="%{applyTime}" format="yyyy-MM-dd HH:mm" /></td>
						<td>${status}</td>
						<td>${note}</td>
						<td><s:a action="apply_show?id=%{id}" cssClass="a_show_apply">查看详细</s:a> </td>
						<td><a href="">再次发起</a></td>
					</tr>
				</s:iterator>
			</tbody>
		</table>
		
		<h1>我的审核历史</h1>
		<table class="ui-widget ui-widget-content">
			<thead>
				<tr class="ui-widget-header ">
					<th>任务编号</th>
					<th>审核对象</th>
					<th>申请人</th>
					<th>审核时间</th>
					<th>审核结果</th>
					<th>审核意见</th>
				</tr>
			</thead>
			<tbody>
				<s:iterator id="e2a" value="%{#request.e2aList}">
					<tr>
						<td>${e2a.examine.taskId}</td>
						<td>
							<s:a action="apply_show?id=%{#e2a.apply.id}" cssClass="a_show_apply">${e2a.apply.title}</s:a>
						</td>
						<td>
							${e2a.apply.applicant.name}
						</td>
						<td><s:date name="%{#e2a.examine.examineTime}" format="yyyy-MM-dd HH:mm" /></td>
						<td>
							<s:if test="%{#e2a.examine.opinion==0}">未查看</s:if>
							<s:elseif test="%{#e2a.examine.opinion==1}">处理中</s:elseif>
							<s:elseif test="%{#e2a.examine.opinion==2}">通过</s:elseif>
							<s:elseif test="%{#e2a.examine.opinion==3}">否决</s:elseif>
						</td>
						<td>${e2a.examine.note}</td>
					</tr>
				</s:iterator>
			</tbody>
		</table>
	</div>
</body>
</html>
